<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="Adobe RoboHelp - www.adobe.com">
<title>Sorting data in a document</title>
<link rel="stylesheet" href="userhelp_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss">
<!--
if (navigator.appName !="Netscape")
{   document.write("<link rel='stylesheet' href='userhelp.css'>");}
//-->
</script>
<style type="text/css">
<!--
ul.whs1 { list-style:disc; }
ol.whs2 { list-style:decimal; }
p.whs3 { margin-left:40px; }
p.whs4 { margin-left:0px; }
-->
</style><script type="text/javascript" language="JavaScript">
<!--
if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4))
{
  var strNSS = "<style type='text/css'>";
  strNSS += "p.whs4 {margin-left:1pt; }";
  strNSS +="</style>";
  document.write(strNSS);
}
//-->
</script>
<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript">
<!--
function reDo() {
  if (innerWidth != origWidth || innerHeight != origHeight)
     location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
	origWidth = innerWidth;
	origHeight = innerHeight;
	onresize = reDo;
}
onerror = null; 
//-->
</script>
<style type="text/css">
<!--
div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; }
-->
</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script>
<script type="text/javascript" language="javascript" src="whver.js"></script>
<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script>
<script type="text/javascript" language="javascript1.2" src="whutils.js"></script>
<script type="text/javascript" language="javascript1.2" src="whlang.js"></script>
<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script>
</head>
<body><script type="text/javascript" language="javascript1.2">
<!--
if (window.gbWhTopic)
{
	if (window.addTocInfo)
	{
	addTocInfo("Creating and modifying documents and dashboards\nGrouping and sorting data in a document\nSorting data in a document\nSorting data in a document");
addButton("show",BTN_TEXT,"Show","","","","",0,0,"","","");

	}
	if (window.writeBtnStyle)
		writeBtnStyle();

	if (window.writeIntopicBar)
		writeIntopicBar(1);

	if(1)
	{
	
	}

	if (window.setRelStartPage)
	{
	setRelStartPage("MicroStrategy_Web_Help.htm");

		autoSync(1);
		sendSyncInfo();
		sendAveInfoOut();
	}
}
else
	if (window.gbIE4)
		document.location.reload();

//-->
</script>
<h1>Sorting data in a document </h1>
<p>A document's data is sorted according to its group settings, such as 
 in page-bys. However, you may want to control its sort further. The order 
 of the sort keys (the sort-by fields) is defined by the order of the groupings, 
 as described in 
<a HREF="Grouping_data.htm">Grouping records in a document</a>. 
 You can sort based on objects from the primary dataset only.</p>
<p>For example, you may want to sort the information in the document's 
 Detail section. If you have a document grouped by Region and Year, in 
 the Detail section, you may want to sort the records by Revenue in descending 
 order. </p>
<p>If sorting by custom group, you can choose from the following options: 
 </p>
<ul type="disc" class="whs1">
	
<li class=p><p>Use the default sort property of the custom group.</p></li>
	
<li class=p><p>Select the position of the components of the custom 
 group, whether the element name or its individual components are displayed 
 first. Top means that the element name is displayed first, then the individual 
 items. Bottom means that the individual items of an element are displayed 
 first, followed by the element name. For these options to affect the document, 
 the custom group must be displayed as <span style="font-weight: bold;"><B>Show 
 only the individual items within the element and also expand these individual 
 items if possible</B></span> or <span style="font-weight: bold;"><B>Show element 
 names, individual items within this element and also expand these individual 
 items if possible</B></span>.</p></li>
</ul>
<p>You can also sort consolidations. If the object is a consolidation, 
 an ascending sort displays the elements in the order in which they were 
 defined. Descending order reverses that order.</p>
<p>For steps to sort grouping fields, see 
<a HREF="Sorting_grouping_fields.htm">Sorting 
 grouping fields</a>.</p>
<h2>
<a name="Sort document procedure"></a>To sort records in a document</h2>
<ol type="1" class="whs2">
	
<li class=p><p>Open the document in <span style="font-weight: bold;"><B>Design 
 </B></span>or <span style="font-weight: bold;"><B>Editable Mode</B></span>. </p></li>
	
<li class=p><p>From the <span style="font-weight: bold;"><B>Data</B></span> 
 menu, select <span style="font-weight: bold;"><B>Sort Document</B></span>. The 
 Sort Document&nbsp;dialog box opens. </p></li>
	
<li class=p><p>From the <span style="font-weight: bold;"><B>Sort by</B></span> 
 drop-down list in the Detail area, select the object to sort. The list 
 contains all the objects in the primary dataset, regardless of where or 
 whether they are placed on the document.</p></li>
	<ul>
<li style="list-style: disc;" type=disc class=p><p>If the Sort 
 by object is an attribute, select which attribute form to sort on.</p></li>
		
<li style="list-style: disc;" type=disc class=p><p>If the Sort 
 by object is a custom group, from the drop-down list, select from the 
 following options:</p></li>
		<ul>
<li style="list-style: disc;" type=disc class=p><p><span style="font-weight: bold;"><B>Default</B></span>: 
 Inherits the sort property of the custom group</p></li>
			
<li style="list-style: disc;" type=disc class=p><p><span style="font-weight: bold;"><B>Top</B></span>: 
 The element name is displayed first, then its individual items</p></li>
			
<li style="list-style: disc;" type=disc class=p><p><span style="font-weight: bold;"><B>Bottom</B></span>: 
 The individual items of an element are displayed, followed by the element 
 name</p></li>
		</ul>
	</ul>
</ol>
<ol type="1" class="whs2">
	<ul>
<li style="list-style: disc;" type=disc class=p><p>If the Sort 
 by object is a consolidation or metric, specify the sort order.</p></li>
	</ul>
</ol>
<ol start="4" type="1" class="whs2">
	
<li class=p><p>Select <span style="font-weight: bold;"><B>Ascending</B></span> 
 or <span style="font-weight: bold;"><B>Descending</B></span> for each object. 
 </p></li>
</ol>
<p class="whs3"><span style="font-weight: bold;"><B>Note</B></span>: 
 You cannot change the sort order if the criteria of an attribute is set 
 to Default. You can change the order of a custom group only if you selected 
 Sort on Attribute ID in the Criteria. </p>
<ol start="5" type="1" class="whs2">
	
<li class=p><p class="whs4">You can also 
<a HREF="Sorting_grouping_fields.htm">sort 
 the grouping fields</a> of the document.</p></li>
	
<li class=p><p class="whs4">From the<span style="font-weight: bold;"><B> 
 Then by</B></span> drop-down lists, specify additional sort objects as necessary. 
 These objects are sorted after the Sort By object.</p></li>
	
<li class=p><p class="whs4">Click <span style="font-weight: bold;"><B>OK</B></span> 
 to apply the changes and return to the document.</p></li>
</ol>
<h3>Related topics</h3>
<ul type="disc" class="whs1">
	
<li class=p><p>
<a href="Sort_Document_dialog.htm">Sort Document dialog 
 box</a></p></li>
	
<li class=p><p>
<a HREF="Sorting_grouping_fields.htm">Sorting grouping 
 fields</a></p></li>
	
<li class=p><p>
<a HREF="Grouping_data.htm">Grouping records in a document</a></p></li>
</ul>
<script type="text/javascript" language="javascript1.2">
<!--
highlightSearch();
if (window.writeIntopicBar)
	writeIntopicBar(0);
if(0)
{

}
//-->
</script>
</body>
</html>
